\section{/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFutil/random.cpp File Reference}
\label{random_8cpp}\index{/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFutil/random.cpp@{/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFutil/random.cpp}}


{\tt \#include \char`\"{}NFutil.hh\char`\"{}}\par
{\tt \#include \char`\"{}MTrand/mtrand.h\char`\"{}}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include $<$cstdlib$>$}\par
{\tt \#include $<$math.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
double {\bf NFutil::RANDOM} (double max)
\begin{CompactList}\small\item\em Uniform random number on the interval (0,max]. \item\end{CompactList}\item 
double {\bf NFutil::RANDOM\_\-CLOSED} ()
\begin{CompactList}\small\item\em Uniform random number on the interval (0,1). \item\end{CompactList}\item 
double {\bf NFutil::RANDOM\_\-GAUSSIAN} ()
\begin{CompactList}\small\item\em Normally distributed random number with mean 0 and variance 1. \item\end{CompactList}\item 
int {\bf NFutil::RANDOM\_\-INT} (unsigned long min, unsigned long max)
\begin{CompactList}\small\item\em Uniform random number on the interval [min,max]. \item\end{CompactList}\item 
void {\bf NFutil::SEED\_\-RANDOM} (unsigned long seed)
\begin{CompactList}\small\item\em Seeds the random number generator used in all simulations. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static int {\bf initflag} = 1
\item 
static bool {\bf haveNextGaussian} = false
\item 
static double {\bf nextGaussian} = 0
\item 
static {\bf MTRand\_\-int32} {\bf iRand}
\item 
static {\bf MTRand} {\bf dRand}
\item 
static {\bf MTRand\_\-closed} {\bf dRandClosed}
\item 
static {\bf MTRand\_\-open} {\bf dRandOpen}
\end{CompactItemize}


\subsection{Variable Documentation}
\index{random.cpp@{random.cpp}!dRand@{dRand}}
\index{dRand@{dRand}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf MTRand} {\bf dRand}\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_48bbb8eb31cbfd556092830a98231d03}


\index{random.cpp@{random.cpp}!dRandClosed@{dRandClosed}}
\index{dRandClosed@{dRandClosed}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf MTRand\_\-closed} {\bf dRandClosed}\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_f661d70fb60f0f8bb9eab40d6a0bda30}


\index{random.cpp@{random.cpp}!dRandOpen@{dRandOpen}}
\index{dRandOpen@{dRandOpen}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf MTRand\_\-open} {\bf dRandOpen}\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_ca6e2c87601efbafd1a0dde621e0f38a}


\index{random.cpp@{random.cpp}!haveNextGaussian@{haveNextGaussian}}
\index{haveNextGaussian@{haveNextGaussian}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf haveNextGaussian} = false\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_a3af79b4ac416c72226060ccedba3948}


\index{random.cpp@{random.cpp}!initflag@{initflag}}
\index{initflag@{initflag}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf initflag} = 1\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_37b318383ca653e8042174ab53cfb827}


\index{random.cpp@{random.cpp}!iRand@{iRand}}
\index{iRand@{iRand}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf MTRand\_\-int32} {\bf iRand}\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_d4151f36df5c34dea9fed4dce109d195}


\index{random.cpp@{random.cpp}!nextGaussian@{nextGaussian}}
\index{nextGaussian@{nextGaussian}!random.cpp@{random.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double {\bf nextGaussian} = 0\hspace{0.3cm}{\tt  [static]}}\label{random_8cpp_0a52667c2e0e040b5dc629bf5ec51c35}


